package com.pdg.mcplugin.spawnsurance;

import org.bukkit.command.CommandSender;

import com.pdg.mcplugin.common.deprecated.DeprecatedPermissionCheckerBase;

public class PermissionChecker extends DeprecatedPermissionCheckerBase<SpawnSurance> {

	public static final String permissionUse = "spawnsurance.use";
	public static final String permissionAdminConfiguration = "spawnsurance.admin.configuration";
	public static final String permissionAdminClaims = "spawnsurance.admin.claims";
	
	public PermissionChecker(SpawnSurance thePlugin) {
		super(thePlugin);
		setDefault(permissionUse, false);
		setDefault(permissionAdminConfiguration, true);
		setDefault(permissionAdminClaims, true);
	}
	
	public boolean hasUsePermission(CommandSender theCommandSender){
		return checkPermission(theCommandSender,permissionUse);
	}

	public boolean hasAdminConfigurationPermission(CommandSender theCommandSender){
		return checkPermission(theCommandSender,permissionAdminConfiguration);
	}

	public boolean hasAdminClaimsPermission(CommandSender theCommandSender){
		return checkPermission(theCommandSender,permissionAdminClaims);
	}

	@Override
	protected boolean shouldSuppressNoPermissionMessages(
			String thePermissionName) {
		return false;
	}
	
}
